package com.pubinfo.passbook.common.model.bo.passbook.medical;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import java.io.Serializable;
import java.util.List;

@Data
@NoArgsConstructor
@XmlAccessorType(XmlAccessType.FIELD)
public class EInvoiceSignature {
  
  @ApiModelProperty("开票单位数字签名")
  @XmlElement(name = "Signature")
  private List<Signature> Signature;
  
  @Data
  public static class Signature implements Serializable {
    
    @ApiModelProperty("签名值")
    @XmlElement(name = "SignatureValue")
    private String SignatureValue;
    
    @ApiModelProperty("签名信息")
    @XmlElement(name = "KeyInfo")
    private KeyInfo KeyInfo;
    
    @ApiModelProperty("签名时间")
    @XmlElement(name = "SignatureTime")
    private String SignatureTime;
    
    @ApiModelProperty("证书信息")
    @XmlElement(name = "SignedInfo")
    private SignedInfo SignedInfo;
    
    @Data
    public static class KeyInfo implements Serializable {
      
      @ApiModelProperty("证书编号")
      @XmlElement(name = "SerialNumber")
      private String SerialNumber;
      
      @ApiModelProperty("证书颁发者名称")
      @XmlElement(name = "X509IssuerName")
      private String X509IssuerName;
    }
    
    @Data
    public static class SignedInfo implements Serializable {
      
      @ApiModelProperty("签名格式类型")
      @XmlElement(name = "SignatureFormat")
      private String SignatureFormat;
      
      @ApiModelProperty("签名原文引用")
      @XmlElement(name = "Reference")
      private String Reference;
      
      @ApiModelProperty("签名算法")
      @XmlElement(name = "SignatureAlgorithm")
      private String SignatureAlgorithm;
    }
  }
}
